package io.zim.modules.ws.handler.impl;

import com.alibaba.fastjson.JSONObject;
import io.zim.common.utils.R;
import io.zim.modules.ws.config.ShowcaseServerConfig;
import io.zim.modules.ws.entity.Const;
import io.zim.modules.ws.handler.WsMsgHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tio.websocket.common.WsResponse;

/**
 * 心跳消息处理器
 * @author
 * @since
 */
public class HeartbeatMsgHandler implements WsMsgHandler {
  private static Logger log = LoggerFactory.getLogger(HeartbeatMsgHandler.class);

  @Override
  public WsResponse handle() {
    return WsResponse.fromText(JSONObject.toJSONString(R.error(Const.CODE_200,Const.MSG_200)), ShowcaseServerConfig.CHARSET);
  }
}

